# # -*- coding:utf-8 -*-
# class Solution:
#     def FindNumbersWithSum(self, array, tsum):
#         # write code here
#         res = []
#         if not array:
#             return None
#         mid = len(array) // 2
#         l = 0
#         r = len(array) - 1
#         while l < r:
#             if l >= mid:
#                 break
#             rest = tsum - array[l]
#             for j in range(r, mid-1, -1):
#                 if rest == array[r]:
#                     res.append([array[l], array[j]])
#                 if rest > array[j]:
#                     r = j
#                     break
#             l += 1
#         if not res:
#             return None
#         min_times = res[0][0] * res[0][1]
#         res_arrazy = res[0]
#         for one_array in res:
#             if min_times > one_array[0] * one_array[1]:
#                 min_times = one_array[0] * one_array[1]
#                 res_arrazy = one_array
#         return res_arrazy
# -*- coding:utf-8 -*-
class Solution:
    def FindNumbersWithSum(self, array, tsum):
        # write code here
        
        for i in range(len(array)):
            for j in range(len(array)-1, i, -1):
                if array[i] + array[j] == tsum:
                    return [array[i], array[j]]
                elif array[i] + array[j] < tsum:
                    break
        return []